import request from '../methods.js'
let config = {ShowLoading : true,ShowMsg : true,getAllData : false,new:false,system:false,store:false} 
export default {
	GteBanner:async function(prams){
		let data={...config}
		data.new=true
		return await request.Get('/api/v1/Banner/GteBanner',prams,data)
	},
	// 获取商品分类
	getallcategory:async function(prams){
		let data={...config}
		data.store=true
		return await request.Get('/api/v1/Category/getallcategory',prams,data)
	},
	// 根据分类获取商品
	getall:async function(prams){
		let data={...config}
		data.store=true
		return await request.Post('/api/v1/Product/getall',prams,data)
	},
	// 获取地址
	GetAreas:async function(prams){
		let data={...data}
		data.system=true
		return await request.Get('/api/v1/Areas/GetAreas',prams,data)
	},
	// 添加地址
	insertreceiving:async function(prams){
		let data={...data}
		data.store=true
		return await request.Post('/api/v1/Receiving/insertreceiving',prams,data)
	},
	// 地址列表
	getgeceiving:async function(prams){
		let data={...data}
		data.store=true
		return await request.Get('/api/v1/Receiving/getgeceiving',prams,data)
	},
	// 修改地址状态
	IsEnReceiving:async function(prams){
		let data={...data}
		data.store=true
		return await request.Get('/api/v1/Receiving/IsEnReceiving',prams,data)
	},
	// 获取当前用户信息
	GetUserInfo:async function(prams){
		let data={...data}
		data.new=true
		return await request.Get('/api/v1/Users/GetUserInfo',prams,data)
	},
	// 获取相关字典
	getdictionary:async function(prams){
		let data={...data}
		data.system=true
		return await request.Get('/api/v1/Dictionary/GetDictionarytype',prams,data)
	},
	// // 获取字典
	// getdictionary:async function(prams){
	// 	let data={...data}
	// 	data.system=true
	// 	return await request.Get('/api/v1/Dictionary/GetDictionarytype',prams,data)
	// }
}